<!DOCTYPE html>
<html>
<head>
  <title>Manage Text Ck Editor </title>
    <jsp:include page="inc/header.jsp"></jsp:include>    
</head>
<body class="metro">
    <div class="container">
    	<jsp:include page="inc/top-menu.jsp"></jsp:include>
    	
    	
    	  <script src="ckeditor/ckeditor.js"></script>   
    	  
             <form action="ManageText" method="Post" >      
                   <textarea name="editor1" id="editor1" rows="10" cols="80">
                        This is my textarea to be replaced with CKEditor.
                   </textarea>            
                     <script>              
                       CKEDITOR.replace( 'editor1', {
                       language: 'fr',
                       uiColor: '#9AB8F3'                    
                       });
                     </script>  
              <input type="submit" value="add comment" />            
             </form>
    	
  
        <div class="main-content clearfix">
            <div class="tile-area no-padding clearfix">
            	<table id="jqGrid"></table>
    			<div id="jqGridPager"></div>   
            </div>
        </div> <!-- End of tiles -->

 <script type="text/javascript"> 
        $(document).ready(function () {
        	grid1 = $("#jqGrid").jqGrid({
            	jsonReader: {
            	    repeatitems: false,
            	    id: "5",
            	},
            	prmNames : {
					addoper : "add",
					deloper : "del",
					editoper : "edit",
				},
                url: 'ManageText',
                editurl: 'ManageText',
                datatype: "json",
                colModel: [
					{ label: 'Id', name: 'id', width: 20,key:true},
                    { label: 'Text', name: 'Texterea', width: 200,editable: true },
                
                ],
                width: 1040,
                height: 200,
                rowNum: 10,
				viewrecords: true,
                pager: "#jqGridPager",
                //caption: "Users"
            });

		grid1.navGrid('#jqGridPager', 
			// the buttons to appear on the toolbar of the grid
			{edit : true,add : true,del : true,refresh:true},
     		 // options for the Edit Dialog
     		{
                editCaption: "Edit User",
                closeAfterEdit: true
     		}, 
            // options for the Add Dialog
     		{
                closeAfterAdd: true,
                reloadAfterSubmit: true
     		},
     		// options for the Delete Dailog
     		{});

        });

    </script>

	<jsp:include page="inc/footer.jsp"></jsp:include>
	</div>
</body>
</html>